import java.util.ArrayList;

public class NumberTwo {

    public static void main(String[] args) {
        ArrayList<Integer> ints=new ArrayList<>();
        long l = System.currentTimeMillis();
        for (int i = 0; i < 10000000; i++) {
            ints.add(i);
        }
        long l1 = System.currentTimeMillis();
        System.out.println("向集合中添加1千万个数字需要的时间是："+(l1-l)+"毫秒");
    }

}
